<div id="content">
    <div class="container_medium">
<?php 
        $attributes = array('class' => 'email', 'id' => 'targets');   
        echo form_open_multipart(base_url()."index.php/member/register", $attributes ); 
?>        
        <!-- Type member -->
        <!-- 1 = Dealer -->
        <input type="hidden" id="member_type" name="member_type" value="1" />
        <h1 class="orange">Register to sell your cars</h1>        
        <table class="table_dealer">
            <tr>
                <td>
                    <span class="mandatory">Company</span>
                </td>
                <td>
                    <input type="text" name ="company" id="company" />
                </td>
                <td>
                    <span class='error' id='company_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td style="vertical-align: top;">
                    <span class="field">Service</span>                
                </td>
                <td colspan="2">
                    <div id="service">
                    <ul>
    <?php
                    foreach($service->result() as $row)
                    {
    ?>
                        <li>
                    <input 
                        type="checkbox" 
                        name="service[]" 
                        id="service_<?php echo $row->id; ?>" 
                        value="<?php echo $row->id; ?>" />
                    <label for="service_<?php echo $row->id; ?>">
                        <?php echo $row->name; ?>
                    </label>
                    </li>
    <?php                        
                    }
    ?>
                    </ul>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <span class='mandatory'>Company phone</span >
                </td>
                <td>
                    <input type="text" name ="company_phone_1" id="company_phone_1" />
                </td>
                <td>
                    <span  class='error' id='company_phone_1_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="text" name ="company_phone_2" id="company_phone_2" />
                </td>
                <td>
                    <span  class='error' id='company_phone_2_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td>
                    <span class='mandatory'>Email</span >
                </td>
                <td>
                    <input type="text" name ="email" id="email" />
                </td>
                <td>
                    <span  class='error' id='email_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td>
                    <span class='field'>Website</span >
                </td>
                <td>
                    <input type="text" name ="website" id="website" />
                </td>
                <td>
                    <span  class='error' id='website_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td>
                    <span class='field'>Location</span >
                </td>
                <td>
                    <select name ="location" id="location">
                        <option value="0">Please select</option>
    <?php
                    foreach($location->result() as $row)
                    {
    ?>
                        <option value="<?php echo $row->id; ?>">
    <?php 
                            echo $row->province; 
    ?>
                        </option>
    <?php                        
                    }
    ?>
                    </select>
                </td>
                <td>
                    <span  class='error' id='location_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td style="vertical-align: top;">
                    <span class='field'>Address</span >
                </td>
                <td>
                    <textarea rows="4" cols="30" name="address" id='address'></textarea>            
                </td>
                <td>
                    <div  class='error' id='address_error_msg' >&nbsp;</div>
                </td>
            </tr>
            <tr>
                <td>
                    <span class='mandatory'>Contact name</span>
                </td>
                <td>
                    <input type="text" name ="username" id="username" />
                </td>
                <td>
                    <span  class='error' id='login_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td>
                    <span class='mandatory'>Password</span >
                </td>
                <td>
                    <input type="password" name ="password" id="password" style="width:252px;" />
                </td>
                <td>
                    <span  class='error' id='password_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td>
                    <span class='mandatory'>Confirm password</span >
                </td>
                <td>
                    <input type="password" name ="confirmpassword" id="confirmpassword" style="width:252px;" />
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="3">&nbsp;</td>
            </tr>
            <tr>
                <td>
                    <span class='mandatory'>Contact phone</span >
                </td>
                <td>
                    <input type="text" name ="contact_phone_1" id="contact_phone_1" />
                </td>
                <td>
                    <span  class='error' id='contact_phone_1_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="text" name ="contact_phone_2" id="contact_phone_2" />
                </td>
                <td>
                    <span  class='error' id='contact_phone_2_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td>Occupation:</td>
                <td>
                    <select name ="occupation" id="occupation">
                        <option value="0">Please Select</option>
                        <option value="1">Owner</option>
                        <option value="2">Investor/buyer</option>
                        <option value="3">Tenant</option>
                        <option value="4">Developer</option>
                        <option value="5">Broker/Agent</option>
                        <option value="6">Appraiser</option>
                        <option value="7">Lender/Mortgage broker</option>
                        <option value="8">Researcher</option>
                        <option value="9">Other</option>
                    </select>
                </td>
                <td>
                    <span  class='error' id='position_error_msg'> &nbsp;</span >
                </td>
            </tr>
            <tr>
                <td>Photo:</td>
                <td>
                    <input type="file" name="userfile"  size="20" id="photo"  style="width:235px;" />
                </td>
                <td>
                    <div class='error' id='photo_error_msg'>&nbsp;</div>
                </td>
            </tr>
            <tr>
                <td style="vertical-align: top;">Description:</td>
                <td>
                    <textarea rows="4" cols="30" name="description" id='description'></textarea>
                </td>
                <td>
                    <div  class='error' id='description_error_msg' >&nbsp;</div>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="submit" class="register" value="Register" name="submit" />
                </td>
                <td>                
                </td>
            </tr>
        </table>
    <?php 
        echo form_close() 
    ?>        
</div>
    <div class="quicklink">
<?php 
        $this->load->view('/templates/quicklinks');
?>                        
    </div>    
</div>
<div class="separator"></div>